API Direct Debit - Payment
Berfungsi untuk melakukan payment debit dan response payment akan dikirmkan via callback
Service Info
HTTP Method | POST |
---|---|
Service Code | 54 |
Http Method | POST |
Path | ...{version}/debit/payment-to-host |
Header
Header Name | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
Content-Type | String | Y | application/json |
Authorization | String | Y | Token B2B |
Authorization-Customer | String | Y | Token B2B2C |
X-SIGNATURE | String | Y | Dibuat dengan algoritma asymmetric with token B2B2C : Signature Generation |
X-PARTNER-ID | String | Y | Client’s client_id (diberikan pada saat onboarding ) |
X-EXTERNAL-ID | String | Y | Nomor referensi yang harus unik pada hari yg sama |
CHANNEL-ID | String | Y | 00001 untuk PJP and 00002 untuk non PJP |
Body
Parameter | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
partnerReferenceNo | String | Y | Kode Transaksi milik partner Length: <= 64 karakter |
merchantId | String | Y | Kode unik yang dimiliki setiap user Length: <= 64 characters |
urlParam | Array | Y | Parameter URL yang diperlukan untuk transaksi |
amount | Object | Y | Jumlah |
additionalInfo | Object | Y | Informasi Tambahan |
Request samples
- JSON
- CURL
{
"partnerReferenceNo": "43211234",
"merchantId": "121xxxx",
"urlParam": [
{
"url": "https://developer.patner.co.id/callback",
"type": "PAY_RETURN",
"isDeeplink": "N"
}
],
"amount": {
"value": "65000.00",
"currency": "IDR"
},
"additionalInfo": {
"note": "Payment for smile"
}
}
curl --location --request POST '../v1.0/debit/payment-to-host' \
--header 'X-TIMESTAMP: 2023-01-27T13:51:00+07:00' \
--header 'X-SIGNATURE: RwABEherf+3MTBhIf6vtju6ko+YOFFKWLGgHCD5RwX1I17JCKVn8ffc/TenEIly85InhuIcKCDqDrxbIBhaKEg==' \
--header 'X-PARTNER-ID: 085224a9-4b42-4f7d-959f-4452f8a9a1ff' \
--header 'X-EXTERNAL-ID: 024a31b6-e0c8-429a-9d41-83a2f44b6844' \
--header 'X-DEVICE-ID: android-20013adf6cdd8123f' \
--header 'CHANNEL-ID: 12345' \
--header 'Authorization: Bearer bb005fcb-dea9-499a-9e7a-bcf651b2334e' \
--header 'Authorization-Customer:Bearer 5b8bbaf8-4aca-4072-9ea8-d85bed65105f' \
--header 'Content-Type: application/json' \
--data '{
"partnerReferenceNo": "43211234",
"merchantId": "1212723",
"urlParam": [
{
"url": "https://developer.patner.co.id/callback",
"type": "PAY_RETURN",
"isDeeplink": "N"
}
],
"amount": {
"value": "65000.00",
"currency": "IDR"
},
"additionalInfo": {
"note": "Payment for smile""
}
}'
Response Structure
Parameter | Tipe Data | Deskripsi |
---|---|---|
responseCode | String | Kode respons Panjang: <= 7 karakter |
responseMessage | String | Deskripsi respons Panjang: <= 150 karakter |
referenceNo | String | kode request payment Length: <= 64 karakter |
webRedirectUrl | String | Link redirect URL untuk validasi pin pengguna Length: <= 255 karakter |
Response samples
{
"responseCode": "2005400",
"responseMessage": "Successful",
"referenceNo": "321345",
"webRedirectUrl": "../directdebit?bizno=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
List Response Code API Direct Debit - Payment
Response Code | Response Message | Description |
---|---|---|
2005400 | Success | Sukses |
4005401 | Invalid field format { field name } | Format invalid |
4005402 | Invalid mandatory field {field name} | Format pada bidang wajib tidak ada atau tidak valid |
4015400 | Unauthorized. Invalid Signature | X-Signature salah |
4095400 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID sudah pernah digunakan di hari yang sama |
4045401 | Bad Request | Request header ada yang salah / kurang |
4045401 | Unauthorized. Client Forbidden Access API | Partner tidak dapat mengakses api terkait |